#ifndef APPLICATION_H
#define APPLICATION_H

#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <exception>

#include "object.h"
#include "eventloop.h"
#include "event.h"

using namespace std;

class Application : public Object
{
public:
    explicit Application(int argc, char* argv[]);
    virtual ~Application();

    int exec();
    void quit();

    const EventLoop& eventLoop() const;
    EventLoop& eventLoop();

    static Application* instance();
private:
    EventLoop _eventLoop;

    static Application* m_instance;
};

#endif // APPLICATION_H
